﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:43:43
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.WorkFlow
{
	/// <summary>
	/// 当前步骤
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("当前步骤")]
	[BindTable("CurrentStep", Description = "当前步骤", ConnName = "WorkFlow", DbType = DatabaseType.SqlServer)]
	public partial class CurrentStep
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _EntryID;
		/// <summary>
		/// 实体编号
		/// </summary>
		[Description("实体编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(2, "EntryID", "实体编号", "", "int", 10, 0, false)]
		public Int32 EntryID
		{
			get { return _EntryID; }
			set { if (OnPropertyChange("EntryID", value)) _EntryID = value; }
		}

		private Int32 _StepID;
		/// <summary>
		/// 步骤编号
		/// </summary>
		[Description("步骤编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(3, "StepID", "步骤编号", "", "int", 10, 0, false)]
		public Int32 StepID
		{
			get { return _StepID; }
			set { if (OnPropertyChange("StepID", value)) _StepID = value; }
		}

		private Int32 _ActionID;
		/// <summary>
		/// 操作编号
		/// </summary>
		[Description("操作编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(4, "ActionID", "操作编号", "", "int", 10, 0, false)]
		public Int32 ActionID
		{
			get { return _ActionID; }
			set { if (OnPropertyChange("ActionID", value)) _ActionID = value; }
		}

		private String _Owner;
		/// <summary>
		/// 
		/// </summary>
		[Description("")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(5, "Owner", "", "", "nvarchar(200)", 0, 0, true)]
		public String Owner
		{
			get { return _Owner; }
			set { if (OnPropertyChange("Owner", value)) _Owner = value; }
		}

		private DateTime _StartDate;
		/// <summary>
		/// 开始日期
		/// </summary>
		[Description("开始日期")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(6, "StartDate", "开始日期", "", "datetime2", 7, 0, false)]
		public DateTime StartDate
		{
			get { return _StartDate; }
			set { if (OnPropertyChange("StartDate", value)) _StartDate = value; }
		}

		private DateTime _FinishDate;
		/// <summary>
		/// 完成日期
		/// </summary>
		[Description("完成日期")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(7, "FinishDate", "完成日期", "", "datetime2", 7, 0, false)]
		public DateTime FinishDate
		{
			get { return _FinishDate; }
			set { if (OnPropertyChange("FinishDate", value)) _FinishDate = value; }
		}

		private DateTime _DueDate;
		/// <summary>
		/// 约定日期
		/// </summary>
		[Description("约定日期")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(8, "DueDate", "约定日期", "", "datetime2", 7, 0, false)]
		public DateTime DueDate
		{
			get { return _DueDate; }
			set { if (OnPropertyChange("DueDate", value)) _DueDate = value; }
		}

		private String _Status;
		/// <summary>
		/// 状态
		/// </summary>
		[Description("状态")]
		[DataObjectField(false, false, true, 40)]
		[BindColumn(9, "Status", "状态", "", "nvarchar(40)", 0, 0, true)]
		public String Status
		{
			get { return _Status; }
			set { if (OnPropertyChange("Status", value)) _Status = value; }
		}

		private String _Caller;
		/// <summary>
		/// 呼叫者
		/// </summary>
		[Description("呼叫者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(10, "Caller", "呼叫者", "", "nvarchar(200)", 0, 0, true)]
		public String Caller
		{
			get { return _Caller; }
			set { if (OnPropertyChange("Caller", value)) _Caller = value; }
		}

		private String _Memo;
		/// <summary>
		/// 注释
		/// </summary>
		[Description("注释")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(11, "Memo", "注释", "", "nvarchar(100)", 0, 0, true)]
		public String Memo
		{
			get { return _Memo; }
			set { if (OnPropertyChange("Memo", value)) _Memo = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(12, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(13, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(14, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(15, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "EntryID" : return _EntryID;
					case "StepID" : return _StepID;
					case "ActionID" : return _ActionID;
					case "Owner" : return _Owner;
					case "StartDate" : return _StartDate;
					case "FinishDate" : return _FinishDate;
					case "DueDate" : return _DueDate;
					case "Status" : return _Status;
					case "Caller" : return _Caller;
					case "Memo" : return _Memo;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "EntryID" : _EntryID = Convert.ToInt32(value); break;
					case "StepID" : _StepID = Convert.ToInt32(value); break;
					case "ActionID" : _ActionID = Convert.ToInt32(value); break;
					case "Owner" : _Owner = Convert.ToString(value); break;
					case "StartDate" : _StartDate = Convert.ToDateTime(value); break;
					case "FinishDate" : _FinishDate = Convert.ToDateTime(value); break;
					case "DueDate" : _DueDate = Convert.ToDateTime(value); break;
					case "Status" : _Status = Convert.ToString(value); break;
					case "Caller" : _Caller = Convert.ToString(value); break;
					case "Memo" : _Memo = Convert.ToString(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得当前步骤字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 实体编号
			///</summary>
			public const String EntryID = "EntryID";

			///<summary>
			/// 步骤编号
			///</summary>
			public const String StepID = "StepID";

			///<summary>
			/// 操作编号
			///</summary>
			public const String ActionID = "ActionID";

			///<summary>
			/// 
			///</summary>
			public const String Owner = "Owner";

			///<summary>
			/// 开始日期
			///</summary>
			public const String StartDate = "StartDate";

			///<summary>
			/// 完成日期
			///</summary>
			public const String FinishDate = "FinishDate";

			///<summary>
			/// 约定日期
			///</summary>
			public const String DueDate = "DueDate";

			///<summary>
			/// 状态
			///</summary>
			public const String Status = "Status";

			///<summary>
			/// 呼叫者
			///</summary>
			public const String Caller = "Caller";

			///<summary>
			/// 注释
			///</summary>
			public const String Memo = "Memo";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}